package cn.regexp.service.impl;

import cn.regexp.domain.Product;
import cn.regexp.repository.ProductRepository;
import cn.regexp.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductRepository productRepository;
    @Override
    public Product get(Long id) {
        return productRepository.findById(id).get();
    }
}
